/**
 * 吸水纸
 */
Xishuizhi = Widget.extend({
	ctor:function(){
		this._super();
		this.init();
		this.setTag(TAG_ZHI);
	},
	init:function(){
		if(gg.flow.flow.action==ACTION_DO1){
			var xishuizhi = new Button(this, 5, TAG_XISHUIZHI, "#xishuizhi.png", this.callback);
		}else{
			var xishuizhi = new Button(this, 5, TAG_XISHUIZHI2, "#xishuizhi.png", this.callback);
		}
	},
	callback:function(p){
		var func=cc.callFunc(this.actionDone, this);
		switch(p.getTag()){
		case TAG_XISHUIZHI:
			var move=cc.moveTo(0.6,cc.p(-370,150));
			var move1=cc.moveTo(0.6,cc.p(-370,-130));
			var fad=cc.fadeOut(0);
			var seq=cc.sequence(move,move1,move,fad,cc.callFunc(function() {
				this.removeFromParent();
			}, this),func);
			p.runAction(seq);
			break;
		case TAG_XISHUIZHI2:
			var move=cc.moveTo(0.6, cc.p(-530,100));
			var move1=cc.moveTo(0.6, cc.p(-530,0));
			var seq=cc.sequence(move,move1,move,cc.callFunc(function() {
				p.removeFromParent();
			}, this),func);
			p.runAction(seq);
			break;
		}
	},
	actionDone:function(p){
		switch(p.getTag()){
		case TAG_XISHUIZHI:
			gg.flow.next();
			break;
		case TAG_XISHUIZHI2:
			gg.flow.next();
			break;	
		}
	},
});